import { get, post } from '@utils/request'
import { IPwdRuleForm } from '@dts/common'

/** 获取图形验证码 时间撮 */
export const getVerifyCode = (key: string) => {
  return get(
    '/captcha/image',
    {
      key
    },
    {
      responseType: 'arraybuffer'
    }
  )
}

/** 账号密码登陆 */
export const postPwdLogin = (data: IPwdRuleForm) => {
  return post<string>('/u/loginByJson', data)
}
